package ai.plantdata.Creation.mode.AbstractFactoryPattern.factory;

import ai.plantdata.Creation.mode.AbstractFactoryPattern.abstracts.AbstractFactory;
import ai.plantdata.Creation.mode.AbstractFactoryPattern.interfaces.Color;
import ai.plantdata.Creation.mode.AbstractFactoryPattern.interfaces.Shape;
import ai.plantdata.Creation.mode.AbstractFactoryPattern.interfaces.impl.Circle;
import ai.plantdata.Creation.mode.AbstractFactoryPattern.interfaces.impl.Rectangle;
import ai.plantdata.Creation.mode.AbstractFactoryPattern.interfaces.impl.Square;

public class ShapeFactory extends AbstractFactory {
    
   @Override
   public Shape getShape(String shapeType){
      if(shapeType == null){
         return null;
      }        
      if("CIRCLE".equalsIgnoreCase(shapeType)){
         return new Circle();
      } else if("RECTANGLE".equalsIgnoreCase(shapeType)){
         return new Rectangle();
      } else if("SQUARE".equalsIgnoreCase(shapeType)){
         return new Square();
      }
      return null;
   }
   
   @Override
   public Color getColor(String color) {
      return null;
   }
}